package com.kepler.social.app.assembler;

import com.kepler.social.domain.port.vo.LoginSuccessUserInfoVo;
import com.kepler.social.domain.user.account.UserAccountAggregate;

public class UserLoginAssembler {

    public static LoginSuccessUserInfoVo loginSuccessUserInfo(UserAccountAggregate aggregate) {
        return LoginSuccessUserInfoVo.builder()
                .userId(aggregate.getRoot().getUserId())
                .countryCallingCode(aggregate.getRoot().getCountryCallingCode())
                .mobilePhoneNumber(aggregate.getRoot().getMobilePhoneNumber())
                .nickName(aggregate.getSocialInfo().getNickName())
                .gender(aggregate.getRoot().getGender())
                .birthday(aggregate.getRoot().getBirthday())
                .avatar(aggregate.getSocialInfo().getAvatar())
                .bgImage(aggregate.getSocialInfo().getBgImage())
                .profile(aggregate.getSocialInfo().getProfile())
                .modifiedTime(aggregate.lmt())
                .build();
    }

}
